Adding Dynamic Filters |
|
- In the implementation of the GetEmployeeDF method, change the WHERE field and add the following dynamic filters:
WHERE :DF1 and :DF2 and :DF3
Note: In this case you must provide 3 conditions at runtime. It is also possible to add one dynamic filter in the implementation and at runtime. - Change the parameter value by replacing the EmployeeID parameter with the following
- <DF1 type='dfilter'/>
- <DF2 type='dfilter'/>
- <DF3 type='dfilter'/>
Implementation is as follows:<implementation type="DBSQL"> <constructor language="DBSQL"> <query>SELECT "EmployeeID","LastName","FirstName","City" FROM "Employees" WHERE :DF1 and :DF2 and :DF3</query> <parameters> <DF1 type="dfilter"/> <DF2 type="dfilter"/> <DF3 type="dfilter"/> </parameters> </constructor> </implementation>
- In the interface of the method, change the GetEmployee DF element and the interface is as follows
<xsd:element name="GetEmployeeDF"> <xsd:complexType> <xsd:sequence> <xsd:element name="DF1"> <xsd:complexType mixed="true"> <xsd:attribute default="dfilter" name="type"/> </xsd:complexType> </xsd:element> <xsd:element name="DF2"> <xsd:complexType mixed="true"> <xsd:attribute default="dfilter" name="type"/> </xsd:complexType> </xsd:element> <xsd:element name="DF3"> <xsd:complexType mixed="true"> <xsd:attribute default="dfilter" name="type"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element>